There are sensors in which locking arms are arranged at the side or at one end of the sensor. By means of the locking arms and possibly other suitable latching devices, such sensors are inserted into the recess of a housing and locked in place there. The locking arms thus serve to reliably secure the sensor in the housing. Such sensors are designed as temperature sensors, for example. Temperature sensors have a temperature-sensitive sensing element at one end of the sensor body, while at the other end of the sensor body there is an electrical contact device, by means of which electrical conductors extending outward from the sensor are electrically connected to the sensing element. Such temperature sensors can be used, for example, as outside temperature sensors, as room temperature sensors for heating, ventilation and air-conditioning technology in stationary systems (buildings) or in mobile systems, like vehicles.